<!--头部样式-->
<template> 
    <div class="head-back" @click="goBack"  :style="'height:'+headHeight+'rpx;padding-top:'+headPadding+'rpx;background:'+background+';position:'+position+';top:'+headTop"> 
        <i-icon type="return" size="25" :color="color"  v-if="iconShow"/>
        <span :style="'color:'+color" :class="{'pad-left':!iconShow}">{{title}}</span> 
    </div>  
</template>

<script>
export default {
    props: {
        title:{
            default:'',
            type:String
        },
        color:{
            default:'#1D2438',
            type:String
        },
        iconShow:{
            default:true
        },
        background:{
            default:'#fff',
            type:String
        },
        position:{
            default:'fixed',
            type:String
        },
        headTop:{
            default:'0',
            type:String
        },
    },
    data () {
        return {  
            headHeight:wx.getStorageSync('headHeight'),
            headPadding:wx.getStorageSync('headPadding'), 
        }
    },
    methods:{
        goBack(){
            this.$emit('goBack');
        },
    }, 
}
</script>

<style scoped lang="scss">
.head-back{ 
    z-index:5000;
    width:100%;
    padding-left:10rpx; 
    span{ 
      font-size:30rpx;
      margin-left:6rpx;
    } 
    .pad-left{
        padding-left:20rpx;
    }
}
</style>
